sudo apt-get install libgoogle-glog-dev

# git clone https://github.com/gflags/gflags.git
# cd gflags
# mkdir build && cd build
# cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DGFLAGS_NAMESPACE=gflags ../
# make -j4
# sudo make install

git clone https://ghproxy.com/https://github.com/google/googletest
cd googletest

cmake CMakeLists.txt
sudo make install

# 拷贝到系统目录，注意，如果下诉目录位置在不同版本位置有变动，用find . -name "libgtest*.a" 找到位置
# sudo cp lib/libgtest*.so /usr/lib
# sudo cp –a include/gtest /usr/include

sudo ldconfig
